<template>
  <div class="app-container">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <i class="el-icon-warning"></i>
        <el-button style="float: right; padding: 3px 0" type="text" @click="restore">数据初始化</el-button>
      </div>
      <div  class="text item">
        安全警告：此操作为不可逆行为，请谨慎操作！！！
      </div>
    </el-card>
  </div>
</template>

<script>

import "splitpanes/dist/splitpanes.css";
import {
  restoreFactory,
} from "@/api/leave/leave";

export default {
  name: "Leave",
  data() {
    return {

    };
  },
  watch: {},
  created() {
  },
  methods: {

    restore(){
      this.$modal.confirm('是否确认初始化数据').then(function () {
        return restoreFactory();
      }).then(() => {
        this.$modal.msgSuccess("操作成功");
      }).catch(() => {
      });
    }

  }
};
</script>

<style lang="scss" scoped>
.text {
  font-size: 14px;
  color: red;
}

.item {
  margin-bottom: 18px;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both
}

.box-card {
  width: 100%;
}

::v-deep [class^=el-icon-], [class*=" el-icon-"] {
  font-family: "element-icons" !important;
  speak: none;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
   line-height: 1;
  vertical-align: baseline;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  color: #FFA500;
  -moz-osx-font-smoothing: grayscale;
}

</style>
